package ooexercise03;
/*
public abstract class Animal {
    String name;
    int age;
    String colour;

    Animal(String name,int age,String colour){
        this.name = name;
        this.age = age;
        this.colour = colour;
    }

    abstract void eat();

    void drink(){
        System.out.println(colour+"色的"+age+"岁"+name+"在喝水");
    }
}

 */

public abstract class Animal{
    String name;
    int age;
    String colour;

    Animal(String name,int age,String colour){
        this.name = name;
        this.age = age;
        this.colour = colour;
    }

    abstract void eat();

    void drink(){
        System.out.println(colour+"色的"+age+"岁"+name+"在喝水");
    }
}
